package com.app.mapper;

import com.app.model.LotteryRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 抽奖记录 Mapper 接口
 * </p>
 *
 * @author yoominic
 * @since 2023-12-16
 */
@Mapper
public interface LotteryRecordMapper extends BaseMapper<LotteryRecord> {

    List<LotteryRecord> getNewRecords(@Param("activityId") Integer activityId);

    List<LotteryRecord> myLotteryRecord(@Param("userId") Integer userId, @Param("activityId") Integer activityId, @Param("type") Integer type,@Param("page") Integer page ,@Param("limit") Integer limit);

    Integer getUserTodayCount(@Param("userId") Integer userId, @Param("id") Integer id);

    Integer myLotteryRecordCount(@Param("userId") Integer userId, @Param("activityId") Integer activityId, @Param("type") Integer type);
}
